<?php
/**
 * Created by PhpStorm.
 * User: zl
 * Date: 2017/7/22
 * Time: 10:45
 */
    require_once('../Common.php');
    require_once('LoanFee.php');
    $user = $_REQUEST['user_id'];
    $section = $_REQUEST['section_id'];
    $return_array = array();
    if(!isset($user) || !isset($section)){
        $return_array['state'] = 0;
        $return_array['error'] = 'POST_ERROR';
        exit(json_encode($return_array));
    }

    $l_fee = new LoanFee();


    $r = $l_fee->getLoanFeeIDByUser($user, $section);

    if(!$r){
        $return_array['state'] = 0;
        $return_array['error'] = 'DB_ERROR';
        exit(json_encode($return_array));
    }

    $return_array['state'] = 1;
    $return_array['error'] = '';
    $return_array['data'] = $r;

    echo json_encode($return_array);






?>